package com.shinewind.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PageDto implements Serializable {
    /*
        "currentPage":1  //当前页,必须的
        "pageSize":6 //每页展示条数,必须的
        "username":"张三" //用户名，需要做模糊查询,非必须的
        "status":0  //状态:0禁用 1启用 非必须
     */
    @ApiModelProperty(value = "当前页",required = true)
    @Min(value = 0)
    private Integer currentPage;
    @ApiModelProperty(value = "每页展示条数",required = true)
    @Min(value = 1)
    private Integer pageSize;
    @ApiModelProperty(value = "传递的参数")
    @NotNull(message = "传递的参数不能为null")
    private String QueryString;
}